package com.cssy.base.service;

import org.springframework.transaction.annotation.Transactional;

import com.byd.acegiext.domain.User;
import com.plat.exception.SyBaseException;
import com.plat.helper.SearchConditions;
import com.plat.helper.SearchResult;

/**
 * 基础Service类
 * @author silver
 *
 * @param <T>
 */
public interface IBaseService <T>{
	/**
	 * 查询
	 * @param scs
	 * @return
	 * @throws SyBaseException
	 */
	public SearchResult findListByExample(SearchConditions scs) throws SyBaseException;
	
	public Integer delete(String id,User user)throws SyBaseException;
	@Transactional
	public Integer update(T t ,User user)throws SyBaseException;
	@Transactional
	public T save(T t ,User user)throws SyBaseException;
	
	public T findListById(String id) throws SyBaseException;
	
	/**
	 * 假删除
	 * @param id
	 * @return
	 * @throws SyBaseException
	 */
	public Integer deleteBizRemoved(String id) throws SyBaseException;
}
